package com.chinasofti.demo;

public class MathDemo {
    public static void main(String[] args) {
        System.out.println(Math.abs(-34));
        System.out.println(Math.ceil(10.2));
        System.out.println(Math.floor(10.2));
        System.out.println(Math.round(1.5));
        System.out.println(Math.round(1.4));
        System.out.println(Math.max(1,2));
        System.out.println(Math.min(1,2));
        System.out.println(Math.pow(2,3));//返回a的b次幂
        for (int i = 0; i < 10; i++) {
            System.out.println(Math.random());
        }

    }
}
